home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Amigacall v3.51 prof.adf / SCRIPT / FuerProfis < prev    next >
Text File  |  1989-12-16  |  8KB  |  416 lines

  1. #
  2. # AUTO-LOGIN-SCRIPT JAT-BBS   (C) 26.11.88 by J.Reisenweber
  3. #          (permission for distribution granted, if in connection 
  4. #           with AmigaCall)
  5. #
  6. #  (sorry for the english :-)
  7. #
  8. #  Dieses Script wurde mir von Joerg Reisenweber zur Verfuegung 
  9. #  gestellt. Es ist fuer diejenigen gedacht, die sich intensiv mit
  10. #  den Moeglichkeiten der Scripts auseinandersetzen und sich von
  11. #  Beispielen inspirieren lassen wollen.
  12. #
  13. #  Dank an Joerg!
  14. #
  15. #                                                 Markus Schmidt
  16. #
  17. #  Dieses Script ist fuer Anfaenger **NICHT** geeignet!!!
  18. #
  19. print ^[c
  20. list "^[[2;10H^[[33;1mA - C a l l  Autologon-script for BBS using"
  21. print " HAYES-modem^[[m"
  22. setn c,15
  23.  
  24.  
  25. :scroll
  26.   print ^[[H
  27.   print ^[[L
  28.   dec c
  29.   compn !c! !with! 0
  30.   ifhigh goto scroll
  31.   print ^g^[[19;15H^[[1m^n)^o 26.11.88 J.Reisenweber^[[m
  32.   delay 3
  33.   # you might want to do this  ->
  34.   #  loadprefs prefs/autoload
  35.  
  36. #preset metas
  37.   setn br,0
  38.   seta mp,
  39.   seta dw,
  40.   setn mcc,0
  41.  
  42. :reask
  43. # b m w c i x ? oder <cr>
  44. # ask "@10,05; Baudrate Modemparams Doscmd Cmd-mailbox Info"
  45.   ask "@10,05;Do what? (b, m, d, c, i, x or ? for help)"
  46.  
  47. # case select-char
  48.  compa !lastline! !with! b
  49.  ifequ goto baudrate
  50.  
  51.  compa !lastline! !with! m
  52.  ifequ goto modemparam
  53.  
  54.  compa !lastline! !with! d
  55.  ifequ goto doswait
  56.  
  57.  compa !lastline! !with! c
  58.  ifequ goto mbcmd
  59.  
  60.  compa !lastline! !with! i
  61.  ifequ goto info
  62.  
  63.  compa !lastline! !with! x
  64.  ifequ print ^j^j^m  Hope 2 c u again!!
  65.  ifequ exit
  66.  
  67.  compa !lastline! !with! g
  68.  ifequ  goto waitmodem
  69.  
  70.  #show help if ? or illegal cmd
  71.  goto help
  72. # endcase
  73. #
  74.  
  75.  
  76. #sub baudrate
  77. :baudrate
  78.  ask "@10,05;baudrate (<CR>=nochange)"
  79.  compa !lastline! !with!
  80.  ifequ goto reask
  81.  #refuse some false entries
  82.  setn x,!lastline!
  83.  compn !x! !with! 110
  84.  iflow yell
  85.  iflow goto baudrate
  86.  compn !x! !with! 19200
  87.  ifhigh yell
  88.  ifhigh goto baudrate
  89.  setn br,!x!
  90.  kill x
  91.  goto reask
  92. #endsub
  93.  
  94.  
  95. #sub modemparam
  96. :modemparam
  97.  ask "@10,05;modemparameters (ommit starting AT)"
  98.  seta mp,!lastline!
  99.  goto reask
  100. #endsub
  101.  
  102.  
  103. #sub doswait
  104. :doswait
  105.  ask "@10,05;DOS-command: (eg.wait until 4:00)"
  106.  seta dw,!lastline!
  107.  goto reask
  108. #endsub
  109.  
  110.  
  111. #sub mbcmd
  112. :mbcmd
  113.  ask "BBS-command: (<CR>=end ';clr' cmds )"
  114.  compa !lastline! !with! ;clr
  115.  ifequ goto delmbcmd
  116.  compa !lastline! !with!
  117. #exit
  118.  ifequ goto reask
  119.  inc mcc
  120.  seta mc!mcc!,!lastline!
  121.  goto mbcmd
  122. #endsub
  123.  
  124.  
  125. #subsub delmbcmd
  126. :delmbcmd
  127.  compn !mcc! !with! 0
  128.  ifequ goto mbcmd
  129.  kill mc!mcc!
  130.  dec mcc
  131.  goto delmbcmd
  132. #endsubsub
  133.  
  134.  
  135. #sub help
  136. :help
  137. print ^[c^L^j
  138. print "COMMANDS          |  PARAMETERS     | NEXT REQUESTER
  139. print "------------------+-----------------+----------------------------------"
  140. print "                  |                 | "
  141. print "Baudrate          |  110-19200<CR>  | new baudrate"
  142. print "                  |  <CR>           | do not change baudrate"
  143. print "                  |                 | "
  144. print "Modem-parameters  |  <string>       | any modem-command without 'AT', "
  145. print "                  |                 | (e. g. 'M1 L2')"
  146. print "                  |                 | "
  147. print "Dos-command       |  <string>       | any DOS-cmd, e.g. 'WAIT UNTIL 4:00."
  148. print "                  |                 | executed before start dialing BBS"
  149. print "                  |                 | "
  150. print "Cmds for BBS      |  <string>       | this string(s) will be sent to BBS" 
  151. print "                  |                 | login. You may enter multiple cmds,"
  152. print "                  |                 | ending with a plain <CR> or clear "
  153. print "                  |                 | all input by entering ';clr'"
  154. print "                  |                 | "
  155. print "Info              |  <no parameter> | shows current settings: (baudrate,"
  156. print "                  |  <no parameter> | modemparams, doscmd, bbs-cmds)"
  157. print "                  |                 | "
  158. print "eXit              |                 | Obviously exit"
  159. print "Go                |                 | Go call a BBS"
  160. print "                  |                 | "
  161. print "?                 |                 | Obviously this"
  162. print "                  |                 | text"
  163. ask    "@99,99;Hit RETURN to continue"
  164. goto reask
  165. #endsub
  166.  
  167.  
  168.  
  169. #sub info
  170. :info
  171.  print baud:!br! 
  172.  print modem:!mp!
  173.  print DOS:!dw!
  174.  print BBS-cmd(s)
  175.  setn c,1
  176.  :infoloop
  177.  compn !c! !with! !mcc!
  178.  #exit
  179.  ifhigh kill c
  180.  ifhigh kill x
  181.  ifhigh goto reask
  182.  print 
  183.  seta x,!!mc!c!!!
  184.  print !c!:!x!
  185.  inc c
  186.  goto infoloop
  187. #endsub
  188.  
  189.  
  190.  
  191.  
  192. :waitmodem
  193.    dos !dw!
  194.    timeout 3
  195.    send AT^m
  196.    wait OK
  197.    ifnbrk goto resetmodem
  198.    send +++
  199.    wait OK
  200.    ifnbrk goto resetmodem
  201.    send ^Q^Q^Q
  202.    wait OK
  203.    ifnbrk goto resetmodem
  204.    goto waitmodem
  205.  
  206. :resetmodem
  207.    # you might want to do this  ->
  208.    # loadprefs prefs/jat
  209.    compn !br! !with! 0
  210.    ifhigh baud !br!
  211.    delay 1
  212.    send atz^m
  213.    wait OK
  214.    ifnbrk goto initmodem
  215.    goto waitmodem
  216.  
  217. :initmodem
  218.    delay 1
  219.    send atx4 m0 b0 s7=50 s10=120 s11=50 s2=17 s12=80 !mp!^M
  220.    wait OK
  221.  
  222. :dialjat
  223.    setn tries,1
  224. #passwort wird nicht im script gespeichert!!
  225.   ask "@10,05; Passwort JAT:"
  226.   seta pw,!lastline!
  227.    # you may want to ask for a number
  228.    #  ask Enter number to dial
  229.    #  seta number,!lastline!
  230.    # this version always dials 09120 9939
  231.    seta number,09120 9939
  232.  
  233. :redial
  234.    delay 1
  235.    timeout 100
  236.    dial !number!
  237.    wait ^j
  238.    wait ^j
  239.    exact 0
  240.    compa !lastline! !with! CONNECT 1200
  241.    ifequ goto firststart
  242.    exact 1
  243.    delay 1
  244.    compa !lastline! !with! BUSY
  245.    ifequ print ^[[2F
  246.    ifequ inc tries
  247.    ifequ goto redial
  248.    beep 5
  249.  
  250. :hangs
  251.    timeout 15
  252.    wait OK
  253.    ifnbrk goto redial
  254.    beep
  255.    goto hangs
  256.  
  257. :firststart
  258.    beep 3
  259.    seta ln,:AllOfJat/Login.!date!
  260.    clrcapt
  261.    capture 1
  262.    savecapt !ln!
  263.    timeout 40
  264.  
  265. :start
  266.    print ^mLOGIN AT !time!, after !tries! tries.
  267.  
  268. :restart
  269.    wait Username:
  270.    ifnbrk goto UserName
  271.  
  272. :NoLogon
  273.    timeout 5
  274.    SEND ^M
  275.    GOTO restart
  276.  
  277. :UserName
  278.    DELAY 1
  279.    timeout 5
  280.    SEND JOERG^M
  281.    wait Passwort:
  282.    ifnbrk goto PassWort
  283.    SEND ^M
  284.    GOTO restart
  285.  
  286. :PassWort
  287.    SEND !pw!^M
  288.    beep 3
  289.    timeout 60
  290.    wait Befehl: ^G
  291.    ifbrk goto start
  292.  
  293. :LoginOver
  294.    setn c,0
  295.    timeout 60
  296.  
  297. :cmdloop
  298.    inc c
  299.    compn !c! !with! !mcc!
  300.    ifhigh goto nocommand
  301.    seta x,!!mc!c!!!
  302.    send !x!^m
  303.    wait Befehl: ^G
  304.    ifbrk goto noreply
  305.    goto cmdloop
  306.  
  307. :noreply
  308.    yell 3
  309.    ask "@10,05;last cmd didn't return; continue/abort?"
  310.    compa !lastline! !with! c
  311.    ifequ goto cmdloop
  312.    print "  ABORTED !!"
  313.  
  314. :nocommand
  315.    capture 0
  316.    savecapt !ln!
  317.    clrcapt
  318.    kill ln
  319.    seta ln,:AllOfJat/PM.!date!
  320.    clrcapt
  321.    CAPTURE 1
  322.    savecapt !ln!
  323.    send le *^M
  324.    timeout 300
  325.  
  326. :morePM
  327.    wait Befehl: ^G
  328.    ifnbrk goto EndCapture
  329.    compa !lastline! !with! NO CARRIER
  330.    ifequ capture 0
  331.    ifequ savecapt :AllOfJat/PM-ABORT.!date!
  332.    ifequ beep 20
  333.    ifequ exit
  334.    goto morePM
  335.  
  336. :EndCapture
  337.    CAPTURE 0
  338.    savecapt !ln!
  339.    clrcapt
  340.    kill ln
  341.    seta ln,:AllOfJat/ENTRIES.!date!
  342.    capture 1
  343.    savecapt !ln!
  344.    SEND brett !!^M
  345.    timeout 600
  346.  
  347. :moreEntries
  348.    wait Befehl: ^G
  349.    ifnbrk goto EndCapture2
  350.    compa !lastline! !with! NO CARRIER
  351.    ifequ capture 0
  352.    ifequ savecapt :AllOfJat/ENTRIES-ABORT.!date!
  353.    ifequ beep 20
  354.    ifequ exit
  355.    goto moreEntries
  356.  
  357. :EndCapture2
  358.    CAPTURE 0
  359.    savecapt !ln!
  360.    clrcapt
  361.    kill ln
  362.    seta ln, :AllOfJat/Files.!date!
  363.    clrcapt
  364.    capture 1
  365.    savecapt !ln!
  366.    SEND file inhalt neu^M
  367.    timeout 180
  368.  
  369. :moreFiles
  370.    wait Befehl: ^G
  371.    ifnbrk goto EndCapture3
  372.    compa !lastline! !with! NO CARRIER
  373.    ifequ capture 0
  374.    ifequ savecapt :AllOfJat/FILES-ABORT.!date!
  375.    ifequ beep 20
  376.    ifequ exit
  377.    goto moreFiles
  378.  
  379.  
  380. :EndCapture3
  381.    CAPTURE 0
  382.    savecapt !ln!
  383.    clrcapt
  384.    kill ln
  385.    seta ln, :AllOfJat/Logout.!date!
  386.    capture 1
  387.    send e e^M
  388.    delay 2
  389.    send ^Q^Q^Q
  390.    delay 2
  391.    send ath^m
  392.    delay 1
  393.    capture 0
  394.    savecapt :AllOfJat/Logout.!date!
  395.  
  396. :jetzt-kommt-der-anruftracer
  397. :waitfirstring
  398.   timeout 999999
  399.   wait RING
  400.   ifbrk goto waitfirstring
  401.   timeout 10
  402.   delay 1
  403.   print ^[[2F
  404.   kill tries
  405.   setn tries,1
  406.  
  407. :morerings
  408.   wait RING
  409.   delay 1
  410.   ifnbrk print ^[[2F
  411.   ifnbrk inc tries
  412.   ifnbrk goto morerings
  413.   print at !date! !time!, !tries! rings.
  414.   goto waitfirstring
  415.  
  416.